<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/assets/H-ui/static/h-ui/css/H-ui.min.css" />
        <%--引起冲突的样式--%>
    <%--<link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/table.css"/>--%>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/assets/H-ui/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/assets/H-ui/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/assets/H-ui/static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/bootstrap.css"/>
    <!--_footer 作为公共模版分离出去-->
        <script src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
        <script src="${pageContext.request.contextPath}/assets/js/bootstrap.min.js"></script>
        <!--/_footer /作为公共模版分离出去-->
    <title>报告列表管理 -  </title>
</head>
<body>

<%--<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>--%>
<!--/_menu 作为公共模版分离出去-->
<section class="Hui-article-box">
    <div class="Hui-article">
        <article class="cl pd-20">
            <%--<div class="text-c">--%>
                <%--<input type="text" class="input-text" style="width:250px"  id="" name="">--%>
                <%--<button type="submit" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i>搜索</button>--%>
            <%--</div>--%>
            <div class="cl pd-5 bg-1 bk-gray mt-20">
                 <div class="mt-20">
                     <h3 align="center">体检报告列表</h3>
                <table class="table table-border table-bordered table-hover table-bg table-sort">
                    <thead>
                    <tr class="text-c">
                        <th width="100">报告ID</th>
                        <%--<th width="40">报告完成时间</th>--%>
                        <th width="90">体检用户</th>
                        <%--<th width="40">医生</th>--%>
                        <th width="30">状态</th>
                        <th width="100">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:if test="${not empty page}">
                        <c:forEach items="${page.list}" var="report">
                    <tr class="text-c">
                        <td >${report.reportId}</td>
                        <%--<td>${report.reportTime()}</td>--%>
                        <td>${report.user.userName}</td>
                        <%--<td>${report.work.workName}</td>--%>
                        <th>${report.state.stateName}</th>
                        <%--*************--%>
                        <c:if test="${report.state.stateName eq '报告状态'}">
                            <td class="td-manage">
                                <a href="${pageContext.request.contextPath}/report/reportInformation.action?reportId=${report.reportId}" class="btn-primary btn-sm" >报告详情</a>
                            </td>
                        </c:if>
                       <%--************ --%>
                        <c:if test="${report.state.stateName eq '待体检'}">
                        <td class="td-manage">
                            <a href="${pageContext.request.contextPath}/report/reportInformation.action?reportId=${report.reportId}" class="btn-primary btn-sm" >报告详情</a>
                        </td>
                    </c:if>
                        <c:if test="${report.state.stateName eq '待总结'}">
                            <td class="td-manage">
                                <a href="${pageContext.request.contextPath}/report/allRemark.action?reportId=${report.reportId}"
                                   class="btn-primary btn-sm">请写总结</a>
                            </td>
                        </c:if>
                        <c:if test="${report.state.stateName eq '已完成'}">
                            <td class="td-manage">
                                <a href="${pageContext.request.contextPath}/report/report_print.action?reportId=${report.reportId}" class="btn-primary btn-sm" >预览</a>
                            </td>
                        </c:if>

                            </tr>
                        </c:forEach>
                    </c:if>
                    </tbody>
                </table>
                     <div id="page" style="float: right" align="center">
                         总共${page.pages}页，当前第${page.pageNum}页,每页总共${page.pageSize}。
                         <a id="firstPage" class="btn-sm btn-primary" onclick="changeNum(${page.prePage})">上一页</a>
                         <a id="lastPage" class="btn-sm btn-primary" onclick="changeNum(${page.nextPage})">下一页</a>
                     </div>
                 </div>
            </div>
        </article>
    </div>
</section>
<script type="text/javascript">
    $(function () {
        if(${page.isLastPage}){
            $("#lastPage").removeAttr("onclick");
        }
    });
    function changeNum(obj) {
        var num=obj;
        window.location.href="${pageContext.request.contextPath}/report/reportList1.action?num="+num;
    }

</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>